3.6 \(\int \csc (c+d x) (a+a \sec (c+d x)) \, dx\)

Optimal. Leaf size=30 \[ \frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d} \]

[Out]

a*ln(1-cos(d*x+c))/d-a*ln(cos(d*x+c))/d

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3872, 2836, 12, 36, 31, 29} \[ \frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]*(a + a*Sec[c + d*x]),x]

[Out]

(a*Log[1 - Cos[c + d*x]])/d - (a*Log[Cos[c + d*x]])/d

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2836

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d*x)/b
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rule 3872

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[((g*C
os[e + f*x])^p*(b + a*Sin[e + f*x])^m)/Sin[e + f*x]^m, x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \csc (c+d x) (a+a \sec (c+d x)) \, dx &=-\int (-a-a \cos (c+d x)) \csc (c+d x) \sec (c+d x) \, dx\\ &=\frac {a \operatorname {Subst}\left (\int \frac {a}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a^2 \operatorname {Subst}\left (\int \frac {1}{(-a-x) x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=-\frac {a \operatorname {Subst}\left (\int \frac {1}{-a-x} \, dx,x,-a \cos (c+d x)\right )}{d}-\frac {a \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {a \log (1-\cos (c+d x))}{d}-\frac {a \log (\cos (c+d x))}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.04, size = 63, normalized size = 2.10 \[ \frac {a \log \left (\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )\right )}{d}-\frac {a (\log (\cos (c+d x))-\log (\sin (c+d x)))}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]*(a + a*Sec[c + d*x]),x]

[Out]

-((a*Log[Cos[c/2 + (d*x)/2]])/d) + (a*Log[Sin[c/2 + (d*x)/2]])/d - (a*(Log[Cos[c + d*x]] - Log[Sin[c + d*x]]))
/d

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 31, normalized size = 1.03 \[ -\frac {a \log \left (-\cos \left (d x + c\right )\right ) - a \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="fricas")

[Out]

-(a*log(-cos(d*x + c)) - a*log(-1/2*cos(d*x + c) + 1/2))/d

________________________________________________________________________________________

giac [A]  time = 0.50, size = 58, normalized size = 1.93 \[ \frac {a \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right ) - a \log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} - 1 \right |}\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="giac")

[Out]

(a*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1)) - a*log(abs(-(cos(d*x + c) - 1)/(cos(d*x + c) + 1) - 1)))
/d

________________________________________________________________________________________

maple [A]  time = 0.36, size = 15, normalized size = 0.50 \[ \frac {a \ln \left (-1+\sec \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)*(a+a*sec(d*x+c)),x)

[Out]

1/d*a*ln(-1+sec(d*x+c))

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 26, normalized size = 0.87 \[ \frac {a \log \left (\cos \left (d x + c\right ) - 1\right ) - a \log \left (\cos \left (d x + c\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x, algorithm="maxima")

[Out]

(a*log(cos(d*x + c) - 1) - a*log(cos(d*x + c)))/d

________________________________________________________________________________________

mupad [B]  time = 0.12, size = 17, normalized size = 0.57 \[ \frac {2\,a\,\mathrm {atanh}\left (1-2\,\cos \left (c+d\,x\right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a/cos(c + d*x))/sin(c + d*x),x)

[Out]

(2*a*atanh(1 - 2*cos(c + d*x)))/d

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ a \left (\int \csc {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \csc {\left (c + d x \right )}\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)*(a+a*sec(d*x+c)),x)

[Out]

a*(Integral(csc(c + d*x)*sec(c + d*x), x) + Integral(csc(c + d*x), x))

________________________________________________________________________________________